\(\int (c+d x)^2 \cos ^3(a+b x) \, dx\) [18]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 123 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3} \]

[Out]

4/3*d*(d*x+c)*cos(b*x+a)/b^2+2/9*d*(d*x+c)*cos(b*x+a)^3/b^2-14/9*d^2*sin(b*x+a)/b^3+2/3*(d*x+c)^2*sin(b*x+a)/b
+1/3*(d*x+c)^2*cos(b*x+a)^2*sin(b*x+a)/b+2/27*d^2*sin(b*x+a)^3/b^3

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3392, 3377, 2717, 2713} \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]

[In]

Int[(c + d*x)^2*Cos[a + b*x]^3,x]

[Out]

(4*d*(c + d*x)*Cos[a + b*x])/(3*b^2) + (2*d*(c + d*x)*Cos[a + b*x]^3)/(9*b^2) - (14*d^2*Sin[a + b*x])/(9*b^3)
+ (2*(c + d*x)^2*Sin[a + b*x])/(3*b) + ((c + d*x)^2*Cos[a + b*x]^2*Sin[a + b*x])/(3*b) + (2*d^2*Sin[a + b*x]^3
)/(27*b^3)

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3392

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*m*(c + d*x)^(m - 1)*((
b*Sin[e + f*x])^n/(f^2*n^2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - D
ist[d^2*m*((m - 1)/(f^2*n^2)), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x] - Simp[b*(c + d*x)^m*Cos[e + f
*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]

Rubi steps \begin{align*} \text {integral}& = \frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2}{3} \int (c+d x)^2 \cos (a+b x) \, dx-\frac {\left (2 d^2\right ) \int \cos ^3(a+b x) \, dx}{9 b^2} \\ & = \frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}-\frac {(4 d) \int (c+d x) \sin (a+b x) \, dx}{3 b}+\frac {\left (2 d^2\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (a+b x)\right )}{9 b^3} \\ & = \frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {2 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {\left (4 d^2\right ) \int \cos (a+b x) \, dx}{3 b^2} \\ & = \frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.63 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.76 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {162 b d (c+d x) \cos (a+b x)+6 b d (c+d x) \cos (3 (a+b x))+2 \left (-82 d^2+45 b^2 (c+d x)^2+\left (-2 d^2+9 b^2 (c+d x)^2\right ) \cos (2 (a+b x))\right ) \sin (a+b x)}{108 b^3} \]

[In]

Integrate[(c + d*x)^2*Cos[a + b*x]^3,x]

[Out]

(162*b*d*(c + d*x)*Cos[a + b*x] + 6*b*d*(c + d*x)*Cos[3*(a + b*x)] + 2*(-82*d^2 + 45*b^2*(c + d*x)^2 + (-2*d^2
 + 9*b^2*(c + d*x)^2)*Cos[2*(a + b*x)])*Sin[a + b*x])/(108*b^3)

Maple [A] (verified)

Time = 1.64 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.04

method result size
risch \(\frac {3 d \left (d x +c \right ) \cos \left (b x +a \right )}{2 b^{2}}+\frac {3 \left (x^{2} d^{2} b^{2}+2 b^{2} c d x +b^{2} c^{2}-2 d^{2}\right ) \sin \left (b x +a \right )}{4 b^{3}}+\frac {d \left (d x +c \right ) \cos \left (3 b x +3 a \right )}{18 b^{2}}+\frac {\left (9 x^{2} d^{2} b^{2}+18 b^{2} c d x +9 b^{2} c^{2}-2 d^{2}\right ) \sin \left (3 b x +3 a \right )}{108 b^{3}}\) \(128\)
parallelrisch \(\frac {-42 d^{2} \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right ) x b +\left (54 \left (d x +c \right )^{2} b^{2}-84 d^{2}\right ) \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+108 b \left (-\frac {d x}{6}+c \right ) d \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (36 \left (d x +c \right )^{2} b^{2}-152 d^{2}\right ) \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+144 b d \left (\frac {d x}{8}+c \right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (54 \left (d x +c \right )^{2} b^{2}-84 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )+84 b d \left (\frac {d x}{2}+c \right )}{27 b^{3} \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{3}}\) \(180\)
derivativedivides \(\frac {\frac {a^{2} d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{2}}-\frac {2 a c d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b}-\frac {2 a \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {c^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {2 c d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}+\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}}{b}\) \(265\)
default \(\frac {\frac {a^{2} d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{2}}-\frac {2 a c d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b}-\frac {2 a \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {c^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {2 c d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}+\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}}{b}\) \(265\)
norman \(\frac {\frac {4 c d \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}}+\frac {28 c d}{9 b^{2}}+\frac {14 d^{2} x}{9 b^{2}}+\frac {4 \left (9 b^{2} c^{2}-38 d^{2}\right ) \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{27 b^{3}}+\frac {2 \left (9 b^{2} c^{2}-14 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{9 b^{3}}+\frac {2 \left (9 b^{2} c^{2}-14 d^{2}\right ) \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{9 b^{3}}+\frac {16 c d \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}+\frac {2 d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {4 d^{2} x^{2} \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b}+\frac {2 d^{2} x^{2} \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {2 d^{2} x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}-\frac {2 d^{2} x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}-\frac {14 d^{2} x \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{9 b^{2}}+\frac {4 c d x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {8 c d x \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b}+\frac {4 c d x \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{3}}\) \(337\)

[In]

int((d*x+c)^2*cos(b*x+a)^3,x,method=_RETURNVERBOSE)

[Out]

3/2*d*(d*x+c)*cos(b*x+a)/b^2+3/4*(b^2*d^2*x^2+2*b^2*c*d*x+b^2*c^2-2*d^2)/b^3*sin(b*x+a)+1/18/b^2*d*(d*x+c)*cos
(3*b*x+3*a)+1/108*(9*b^2*d^2*x^2+18*b^2*c*d*x+9*b^2*c^2-2*d^2)/b^3*sin(3*b*x+3*a)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.04 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {6 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{3} + 36 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) + {\left (18 \, b^{2} d^{2} x^{2} + 36 \, b^{2} c d x + 18 \, b^{2} c^{2} + {\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \cos \left (b x + a\right )^{2} - 40 \, d^{2}\right )} \sin \left (b x + a\right )}{27 \, b^{3}} \]

[In]

integrate((d*x+c)^2*cos(b*x+a)^3,x, algorithm="fricas")

[Out]

1/27*(6*(b*d^2*x + b*c*d)*cos(b*x + a)^3 + 36*(b*d^2*x + b*c*d)*cos(b*x + a) + (18*b^2*d^2*x^2 + 36*b^2*c*d*x
+ 18*b^2*c^2 + (9*b^2*d^2*x^2 + 18*b^2*c*d*x + 9*b^2*c^2 - 2*d^2)*cos(b*x + a)^2 - 40*d^2)*sin(b*x + a))/b^3

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 284 vs. \(2 (121) = 242\).

Time = 0.38 (sec) , antiderivative size = 284, normalized size of antiderivative = 2.31 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\begin {cases} \frac {2 c^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {c^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d x \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {2 c d x \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 d^{2} x^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {d^{2} x^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 c d \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} + \frac {4 d^{2} x \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 d^{2} x \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} - \frac {40 d^{2} \sin ^{3}{\left (a + b x \right )}}{27 b^{3}} - \frac {14 d^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{9 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \cos ^{3}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate((d*x+c)**2*cos(b*x+a)**3,x)

[Out]

Piecewise((2*c**2*sin(a + b*x)**3/(3*b) + c**2*sin(a + b*x)*cos(a + b*x)**2/b + 4*c*d*x*sin(a + b*x)**3/(3*b)
+ 2*c*d*x*sin(a + b*x)*cos(a + b*x)**2/b + 2*d**2*x**2*sin(a + b*x)**3/(3*b) + d**2*x**2*sin(a + b*x)*cos(a +
b*x)**2/b + 4*c*d*sin(a + b*x)**2*cos(a + b*x)/(3*b**2) + 14*c*d*cos(a + b*x)**3/(9*b**2) + 4*d**2*x*sin(a + b
*x)**2*cos(a + b*x)/(3*b**2) + 14*d**2*x*cos(a + b*x)**3/(9*b**2) - 40*d**2*sin(a + b*x)**3/(27*b**3) - 14*d**
2*sin(a + b*x)*cos(a + b*x)**2/(9*b**3), Ne(b, 0)), ((c**2*x + c*d*x**2 + d**2*x**3/3)*cos(a)**3, True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (111) = 222\).

Time = 0.25 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.17 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=-\frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} c^{2} - \frac {72 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a c d}{b} + \frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a^{2} d^{2}}{b^{2}} - \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} c d}{b} + \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} a d^{2}}{b^{2}} - \frac {{\left (6 \, {\left (b x + a\right )} \cos \left (3 \, b x + 3 \, a\right ) + 162 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} d^{2}}{b^{2}}}{108 \, b} \]

[In]

integrate((d*x+c)^2*cos(b*x+a)^3,x, algorithm="maxima")

[Out]

-1/108*(36*(sin(b*x + a)^3 - 3*sin(b*x + a))*c^2 - 72*(sin(b*x + a)^3 - 3*sin(b*x + a))*a*c*d/b + 36*(sin(b*x
+ a)^3 - 3*sin(b*x + a))*a^2*d^2/b^2 - 6*(3*(b*x + a)*sin(3*b*x + 3*a) + 27*(b*x + a)*sin(b*x + a) + cos(3*b*x
 + 3*a) + 27*cos(b*x + a))*c*d/b + 6*(3*(b*x + a)*sin(3*b*x + 3*a) + 27*(b*x + a)*sin(b*x + a) + cos(3*b*x + 3
*a) + 27*cos(b*x + a))*a*d^2/b^2 - (6*(b*x + a)*cos(3*b*x + 3*a) + 162*(b*x + a)*cos(b*x + a) + (9*(b*x + a)^2
 - 2)*sin(3*b*x + 3*a) + 81*((b*x + a)^2 - 2)*sin(b*x + a))*d^2/b^2)/b

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.11 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {{\left (b d^{2} x + b c d\right )} \cos \left (3 \, b x + 3 \, a\right )}{18 \, b^{3}} + \frac {3 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )}{2 \, b^{3}} + \frac {{\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (3 \, b x + 3 \, a\right )}{108 \, b^{3}} + \frac {3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (b x + a\right )}{4 \, b^{3}} \]

[In]

integrate((d*x+c)^2*cos(b*x+a)^3,x, algorithm="giac")

[Out]

1/18*(b*d^2*x + b*c*d)*cos(3*b*x + 3*a)/b^3 + 3/2*(b*d^2*x + b*c*d)*cos(b*x + a)/b^3 + 1/108*(9*b^2*d^2*x^2 +
18*b^2*c*d*x + 9*b^2*c^2 - 2*d^2)*sin(3*b*x + 3*a)/b^3 + 3/4*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - 2*d^2)*sin
(b*x + a)/b^3

Mupad [B] (verification not implemented)

Time = 14.47 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.41 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {\frac {d^2\,x\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,c\,d\,\cos \left (a+b\,x\right )}{2}+\frac {c\,d\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,d^2\,x\,\cos \left (a+b\,x\right )}{2}}{b^2}+\frac {\frac {3\,c^2\,\sin \left (a+b\,x\right )}{4}+\frac {c^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,d^2\,x^2\,\sin \left (a+b\,x\right )}{4}+\frac {d^2\,x^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,c\,d\,x\,\sin \left (a+b\,x\right )}{2}+\frac {c\,d\,x\,\sin \left (3\,a+3\,b\,x\right )}{6}}{b}-\frac {3\,d^2\,\sin \left (a+b\,x\right )}{2\,b^3}-\frac {d^2\,\sin \left (3\,a+3\,b\,x\right )}{54\,b^3} \]

[In]

int(cos(a + b*x)^3*(c + d*x)^2,x)

[Out]

((d^2*x*cos(3*a + 3*b*x))/18 + (3*c*d*cos(a + b*x))/2 + (c*d*cos(3*a + 3*b*x))/18 + (3*d^2*x*cos(a + b*x))/2)/
b^2 + ((3*c^2*sin(a + b*x))/4 + (c^2*sin(3*a + 3*b*x))/12 + (3*d^2*x^2*sin(a + b*x))/4 + (d^2*x^2*sin(3*a + 3*
b*x))/12 + (3*c*d*x*sin(a + b*x))/2 + (c*d*x*sin(3*a + 3*b*x))/6)/b - (3*d^2*sin(a + b*x))/(2*b^3) - (d^2*sin(
3*a + 3*b*x))/(54*b^3)